<?php
require_once dirname(__FILE__) . '/../includes/common.inc.php';
require_once dirname(__FILE__) . '/../includes/pdoorm.inc.php';

header('Content-Type: text/plain');
die;
$sql="
    insert into ns_v1packageitem
    SELECT a.*,b.oid_b AS sample_id,c.oid_a AS package_id FROM ns_packageitem  AS a LEFT JOIN ns__ez_relation_packageitem_sample AS b 
ON a.e_oid = b.oid_a LEFT JOIN  ns__ez_relation_package_packageitem AS c ON a.e_oid = c.oid_b
";

sql_execute($sql);
